﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mode
{
   public  class userinfo
    {
        public string userId { get; set; }
        public string userName { get; set; }
        public string name { get; set; }
        public bool gender { get; set; }
        public string pwd { get; set; }
        public string email { get; set; }
        public int className { get; set; }
        public byte[] Photo { set; get; }
        public int role{ get; set; }
        public string GenderString { get; set; }
        public virtual Roleinfo Roleinfo { get; set; }
        public virtual Classinfo Classinfo { get; set; }
        public userinfo() { }
        public userinfo(string UserId, string UserName, string Name, string Pwd, string Email, int classname, byte[] photo, int ROle, int classId, int roleId)
        {
            this.userId = UserId;
            this.userName = UserName;
            this.name = Name;         
            this.pwd = Pwd;
            this.email = Email;
            this.className = classname;
            this.Photo = photo;
            this.role = ROle;
            this.Classinfo .classid  = classId;
            this.Roleinfo .roleId  = roleId;
        }
        public userinfo(string Gender)
        {
            if (Gender == "女")
            {
                this.gender = false;
            }
            else
            {
                this.gender = true;
            }
        }
        public userinfo(bool gender)
        {
            if (gender)
            {
                this.GenderString = "男";
            }
            else
            {
                this.GenderString = "女";
            }
        }
    }
}
